package com.pn.taikao.mapper;

import com.pn.taikao.entity.Major;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface MajorMapper {
    int insert(Major major);

    int update(Major major);

    int deleteById(@Param("id") Long id);

    Major selectById(@Param("id") Long id);

    Major selectByName(@Param("name") String name);

    List<Major> selectByCollegeId(@Param("collegeId") Long collegeId);

    List<Major> selectPage(@Param("name") String name,
                          @Param("collegeId") Long collegeId,
                          @Param("offset") int offset,
                          @Param("limit") int limit);

    long count(@Param("name") String name,
               @Param("collegeId") Long collegeId);
}













